package org.jpass.dc.common.exception;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.tools.ant.BuildException;

public class IDEBuildException extends BuildException {

	private static final long serialVersionUID = -7789870964495600387L;
	
	private String message;
	
	public IDEBuildException(String message) {
		super(message);
		this.message = message;
	}
	
	public String getErrorMessage(String regex, String str) {
		Pattern p = Pattern.compile(regex); 
        Matcher m = p.matcher(message);       // 获得匹配器对象
        return m.replaceAll(str);
	}
	
}
